# Copyright (c) 2024 Microsoft Corporation.
# Licensed under the MIT License

"""A module containing the 'PipelineRunResult' model."""

from collections.abc import Callable
from dataclasses import dataclass
from typing import Optional,List,Tuple,Dict,Union
from pathlib import Path
import pandas as pd

ErrorHandlerFn = Callable[[BaseException | None, str | None, dict | None], None]


@dataclass
class PipelineRunResult:
    """Pipeline run result class definition."""

    workflow: str
    result: pd.DataFrame | None
    errors: list[BaseException] | None
@dataclass
class PipelineRunResultWithFilename:
    """Pipeline run result class definition."""

    workflow: str
    result: pd.DataFrame | None
    errors: list[BaseException] | None
    final_filename_full_path: List[Dict[str, Optional[Union[str, Path]]]] | None